package com.twu.biblioteca;


public class Movie extends Record {
    private final int releaseYear;
    private final String director;
    private RecordRating rating = RecordRating.NONE;

    public Movie(int id, String title, RecordState status, int releaseYear, String director, RecordRating rating) {
        super(id, title,status, RecordType.BOOK);
        this.releaseYear = releaseYear;
        this.director = director;
        this.rating = rating;
    }

    @Override
    public boolean isBook() {
        return false;
    }

    @Override
    public boolean isMovie() {
        return true;
    }

    public int getReleaseYear() {
        return releaseYear;
    }

    public String getDirector() {
        return director;
    }

    public RecordRating getRating() {
        return this.rating;
    }

    @Override
    public String toString() {
        return id + "." + title + " " + releaseYear + " " + director + " ®" + rating;
    }

}
